import request from '@/utils/request'
// 新增资料
export function addDoc(data) {
	return request({
		url: '/admin/resource/course/doc',
		method: 'post',
		data,
		showLoading: true
	})
}
// 资料列表
export function listDoc(data) {
	return request({
		url: '/admin/resource/course/doc/list',
		method: 'post',
		data,
		showLoading: true
	})
}
// 资料分页
export function pagingDoc(data) {
	return request({
		url: '/admin/resource/course/doc/paging',
		method: 'post',
		data,
		showLoading: true
	})
}

// 资料详情
export function getDocDetail(id) {
	return request({
		url: '/admin/resource/course/doc/' + id,
		method: 'get',
		showLoading: true
	})
}
// 修改资料
export function editDoc(data) {
	return request({
		url: '/admin/resource/course/doc',
		method: 'put',
		data,
		showLoading: true
	})
}
// 批量删除资料
export function delDoc(idList) {
	return request({
		url: '/admin/resource/course/doc/' + idList,
		method: 'delete',
		showLoading: true
	})
}
// 资料上下架
export function publishDoc(data) {
	return request({
		url: '/admin/resource/course/doc/publish',
		method: 'put',
		data,
		showLoading: true
	})
}
// 资料导入
export function importDoc(data) {
	return request({
		url: '/admin/resource/course/doc/import',
		method: 'post',
		data,
		showLoading: true
	})
}
// 资料导出
export function exportDoc(data) {
	return request({
		url: '/admin/resource/course/doc/export',
		method: 'post',
		data,
		showLoading: true
	})
}
// 批量资料上传
export function batchUploadDoc(data) {
	return request({
		url: '/admin/resource/course/doc/batch/import',
		method: 'post',
		data,
		showLoading: true
	})
}
